//
//  WRYMiddleView.m
//  BaiSiBuJie
//
//  Created by wry on 16/4/30.
//  Copyright © 2016年 WRY. All rights reserved.
//

#import "WRYMiddleView.h"

@interface WRYMiddleView ()
@property (weak, nonatomic) IBOutlet UIButton *loginBtn;

@end

@implementation WRYMiddleView
/**
 *  背景图片不被拉伸
 */
-(void)awakeFromNib
{
    //获取图片
    UIImage *img=_loginBtn.currentBackgroundImage;
   img= [img stretchableImageWithLeftCapWidth:img.size.width/2.0 topCapHeight:img.size.height/2];
    [_loginBtn setBackgroundImage:img forState:(UIControlStateNormal)];
}

+(instancetype)loginMiddleView
{

    return [[[NSBundle mainBundle]loadNibNamed:@"WRYMiddleView" owner:nil options:nil]firstObject];

}


+(instancetype)registerMiddleView
{
    
    return [[[NSBundle mainBundle]loadNibNamed:@"WRYMiddleView" owner:nil options:nil]lastObject];
    
}

@end
